function validateAccount() {
	if ($("#username").val() == "") {
		alert("Vui lòng nhập tên đăng nhập");
		$("#username").focus();
		return false;
	}
	if ($("#password").val() == "") {
		alert("Vui lòng nhập mật khẩu");
		$("#password").focus();
		return false;
	}
	if ($("#rePassword").val() == "") {
		alert("Vui lòng nhập lại mật khẩu");
		$("#rePassword").focus();
		return false;
	}
	if ($("#password").val() != $("#rePassword").val()) {
		alert("Mật khẩu phải trùng khớp với mật khẩu nhập lại");
		$("#password").focus();
		return false;
	}
	if ($("#name").val() == "") {
		alert("Vui lòng nhập họ tên");
		$("#name").focus();
		return false;
	}
	var intRegex = /^\d+$/;
	if ($("#age").val() != "" && !intRegex.test($("#age").val())) {
		alert("Tuổi phải là số");
		$("#age").focus();
		return false;
	}
	return true;
}

$(document).ready(function() { 
	$.blockUI.defaults.css.cursor = "default";
});

jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
    this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
    return this;
}